package com.veo.service.Imp;

import com.github.pagehelper.PageHelper;
import com.veo.dao.OrderDao;
import com.veo.domain.Orders;
import com.veo.service.OrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

@Service("orderService")
public class OrderServiceImpl implements OrderService {

    @Autowired
    private OrderDao orderDao;


    public List<Orders> findAllOrders(int page, int size, String searcherName) {
        PageHelper.startPage(page,size);
        return orderDao.findAllOrders(searcherName);
    }

    public Orders findOrdersById(String id) {
        return orderDao.findOrdersById(id);
    }

    public int deleteOrderTravellerId(String id) {
        return orderDao.deleteOrderTravellerId(id);
    }

    public int deleteOrderById(String id) {
        return orderDao.deleteOrderById(id);
    }

}
